const router = require('koa-router')();
const culture = require('../modules/culture');

//获取数据
router.get('/city/citycul',async(ctx,next) => {
    ctx.body = await culture.getCulture();
})

//增加数据
router.post('/city/citycul',async (ctx,next) => {
    ctx.body = await culture.addCulture(ctx.request.body);
})
//删除数据
router.delete('/city/citycul/:cultureID/:cityID',async (ctx,next) => {
    ctx.body = await culture.deleteCluture(ctx.params);
})
//修改数据
router.put('/city/citycul',async(ctx,next)=>{
    ctx.body = await culture.putCulture(ctx.request.body);
})

module.exports = router;